Ext.namespace("MyApp.in_page.delete_row");

MyApp.in_page.delete_row.deleteRow = function (id, doNext, messageBeforeSuccessAction) {
  Ext.Msg.confirm("Confirm", "Are you sure you want to delete the row?", function(buttonId) {
    if(buttonId == 'yes') {
      var config = {
          method: "DELETE",
          url: restPath + "/in-page/delete-row/delete-row-data/" +encodeURIComponent(id),
          messageBeforeSuccessAction: messageBeforeSuccessAction == true
      };
      MyApp.common.sendJsonRequestAndDoOnSuccess(config, doNext);
    }
  });
};
